
#include "NINA-001.h"

//------------------------------------------------------------------------------
// Name: NINA_001
//------------------------------------------------------------------------------
NINA_001::NINA_001() {

	set_prg_89ab(0);
	set_prg_cdef(-1);
	set_chr_0000_1fff(0);
}


//------------------------------------------------------------------------------
// Name: name
//------------------------------------------------------------------------------
std::string NINA_001::name() const {
	return "NINA-001";
}

//------------------------------------------------------------------------------
// Name:
//------------------------------------------------------------------------------
void NINA_001::write_7(uint16_t address, uint8_t value) {
	switch(address) {
	case 0x7ffd:
		set_prg_89abcdef(value);
		break;
	case 0x7ffe:
		set_chr_0000_0fff(value);
		break;
	case 0x7fff:
		set_chr_1000_1fff(value);
		break;
	default:
		Mapper::write_7(address, value);
	}
}
